const fs = require('fs');
const path = require('path');
console.log(path.join(__dirname, '/a'));
console.log(path.join(__dirname, '/a', './b'));
console.log(path.join(__dirname, '/a', '../b'));
fs.readFile(path.join(__dirname, 'files/1.txt'), 'utf-8', (error, data) => {
    if (error == null) {
        console.log('文件读取成功');
        console.log(data);
    } else {
        console.log('文件读取失败');
    }
});